import socket
import os
import struct
import sys

optcode=b"CZ";
type=b"TB";
agent_bankid=b"";
bank_id=b"90";
date=b"20141219";
date_qs=b"20141219";
tele_id=b"18248460802";
date_s=b"20141219";
date_e=b"";
money=b"0.01";
l_money=b"";
glide_no=b"1000000001";
del_glideno=b"";
node_num=b"00231";
oper=b"171";
acc_ct=b"";
acc_kh=b"13758087991";
identity_code=b"";
region_code=b"571";
check_content=b"";
ext_one=b"";
fname=b"";
status=b"";
errmsg=b"";

host='10.70.128.34'
port=9010
address = (host, port)

data=struct.pack('!5s5s11s3s9s9s13s9s9s20s20s11s11s16s5s41s41s128s5s31s128s31s2s61s',optcode,type,agent_bankid,bank_id,date,date_qs,tele_id,date_s,date_e,money,l_money,glide_no,del_glideno,node_num,oper,acc_ct,acc_kh,identity_code,region_code,check_content,ext_one,fname,status,errmsg)
print(data)
outfile = open("data.txt", "w")
outfile.write(data)
outfile.close()





